﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Hired
{
    public partial class tacs : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(DBEvaluation.DeleteAllEvaluation(DBEvaluation.RetrieveEvaluationList()))
            {
                Console.WriteLine("Delete Evaluation Table Rows Success!");
                
            }
            else
            {
                Console.WriteLine("Delete Evaluation Failed!");
            }

            List<object> buddyRecommendedList = DBRecommendation.RankJobRecommendation(User.Identity.Name).ToList();
            
            gvBuddiesRecommendedJob.DataSource = buddyRecommendedList;
            gvBuddiesRecommendedJob.DataBind();

            DBEvaluation.PopulateEvaluationTable();



            gvSystemEvaluationRecommendedJob.DataSource = DBEvaluation.RetrieveMostMatchesToShowList(User.Identity.Name);
            gvSystemEvaluationRecommendedJob.DataBind();
            
        }

        protected void lbtnResume_Click(object sender, EventArgs e)
        {
            pnlResumeModalPopup.Visible = true;
        }

        protected void btnExit_Click(object sender, ImageClickEventArgs e)
        {
            pnlResumeModalPopup.Visible = false;
        }
    }
}